<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "package_ease_transfer".
 *
 * @property string $id
 * @property string $package_id 资产包ID
 * @property int $method 转让方式
 * @property string $wish 转让意愿
 * @property string $detail 转让价格
 * @property string $evaluate_transfer_date 预计转让时间
 * @property int $transfer 资产包提供方类型
 * @property string $transfer_title 资产包提供方名称
 * @property string $contact 联系人
 * @property string $phone 电话
 * @property string $email 邮箱
 * @property string $address 地址
 * @property string $position 职位
 * @property string $remark 备注
 * @property string $created_at 创建时间
 */
class PackageEaseTransfer extends \yii\db\ActiveRecord
{
//    public static function getDb()
//    {
//        return Yii::$app->get('forge');
//    }
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'package_ease_transfer';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['package_id', 'method', 'transfer'], 'integer'],
            [['method', 'transfer', 'detail'], 'default', 'value' => 0],
            [['transfer'], 'default', 'value' => 1],
            [['transfer_title', 'wish', 'evaluate_transfer_date', 'contact','phone', 'email', 'address', 'position'], 'default', 'value' => ''],
            [['detail',], 'double'],
            [['wish', 'remark', 'evaluate_transfer_date'], 'string'],
            [['created_at', 'phone',], 'safe'],
            [['transfer_title', 'contact', 'email', 'address', 'position'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'package_id' => '资产包ID',
            'method' => '转让方式',
            'wish' => '转让意愿',
            'detail' => '转让价格',
            'evaluate_transfer_date' => '预计转让时间',
            'transfer' => '资产包提供方类型',
            'transfer_title' => '资产包提供方名称',
            'contact' => '联系人',
            'phone' => '电话',
            'email' => '邮箱',
            'address' => '地址',
            'position' => '职位',
            'remark' => '备注',
            'created_at' => '创建时间',
        ];
    }

    /**
     * @inheritdoc
     * @return PackageEaseTransferQuery the active query used by this AR class.
     */
    public static function find()
    {
        return new PackageEaseTransferQuery(get_called_class());
    }
}
